import py2neo_class


neo_init = py2neo_class.Neo4jMod('http://localhost:7474', 'neo4j', '12345678', 'dynasty')

# 清空数据库
neo_init.del_all_data()
print("清空neo4j完毕")
#
# # neo_init.only_one()
# # print("创建唯一性完成")
#
# node1_name = 'emperor'
# node2_name = 'queen'
# node3_name = 'princess'
#
# neo_init.merge_node(node1_name)
# neo_init.merge_node(node1_name)
# neo_init.merge_node(node1_name)
# neo_init.insert_node(node2_name)
# neo_init.insert_node(node3_name)
#
# neo_init.insert_side(node1_name, node2_name, 'husband', 'count', 1)
# neo_init.insert_side(node2_name, node1_name, 'wife', 'count', 1)
# neo_init.insert_side(node1_name, node3_name, 'fa_daughter')
# neo_init.insert_side(node2_name, node3_name, 'mo_daughter')
#
#
# # 设置属性
# neo_init.update_node(node1_name, 1234, 'count')
# neo_init.update_node(node1_name, "http://192.168.1.12:17777/card/1___201880126_朱晓斌__.jpg", 'url')
# neo_init.update_node(node2_name, "http://192.168.1.12:17777/card/1___201880126_朱晓斌__.jpg", 'url')
# neo_init.update_node(node3_name, "http://192.168.1.12:17777/card/1___201880126_朱晓斌__.jpg", 'url')
#
# # neo_init.delete_node_side(label, node1_name)
# # neo_init.delete_side(label, 'mo_daughter', node3_name, node2_name)
#
# xxx = neo_init.query_two_node_relations(node2_name, node3_name)
# print(xxx)
# xx = neo_init.query_one_node_side_node(node2_name, 'mo_daughter')
# print(xx)
#
# # print(xx.to_table())
# # print(xx.to_data_frame())
